-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Develop #1
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make the mentioned changes and put a pull request again.
storyOfMyLife.addWords('My code broke.'); // 'My code broke.' | ||
storyOfMyLife.addWords('I ate some ice cream.'); //'My code broke. I ate some ice cream.' | ||
storyOfMyLife.erase(); // '' | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not complete yet.
|
||
// Your code here. | ||
// → [1, 2, 3, 4, 5, 6] | ||
|
||
// Challenge 2. Your own loop | ||
// Your code here. | ||
function loop(n,condition,update,body) { | ||
for(let n = n; condition; update) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You cant have a function reference as the test condition
in for loop because test condition only understand boolean. This will go in infinite loop.
}, {}); | ||
return result; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to save the result in result
variable. You can directly return like below
function multiMap(arrVals, arrCallbacks) {
return arrVals.reduce((accumulator, currentValue) => {
accumulator[currentValue] = arrCallbacks.map(item => item(currentValue));
return accumulator;
}, {});
}
No description provided.